package com.levi.config;

import com.levi.producer.RocketmqProducer;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class RocketMQConfig {
    @Autowired
    private RocketMQTemplate mqTemplate;

    @PostConstruct
    public void init() {
        RocketmqProducer.rocketMQTemplate = this.mqTemplate;
    }
}
